package com.luli.entity.poi;

public class BizException extends RuntimeException implements Cloneable {

    public static final String SUCCESS_CODE = "0";
    public static final String ERROR_CODE = "1";
    public static final String WARN_CODE = "2";
    private static final long serialVersionUID = 1L;
    private String errorCode = "";
    private String errorMsg = "";
    /**
     * 自定义异常处理对象
     * @author wxs
     * @date 2018-09-05 14:40
     */
    public BizException(String errorCode, String errorMsg) {
        super(errorMsg);
        this.errorCode = errorCode;
        this.errorMsg = errorMsg;
    }

    public BizException(String errorMsg) {
        super(errorMsg);
        this.errorCode = ERROR_CODE;
        this.errorMsg = errorMsg;
    }

    public BizException() {
        super();
    }

    @Override
    public BizException clone() throws CloneNotSupportedException {
        return (BizException) super.clone();
    }

    public String getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(String errorCode) {
        this.errorCode = errorCode;
    }

    public String getErrorMsg() {
        return errorMsg;
    }

    public void setErrorMsg(String errorMsg) {
        this.errorMsg = errorMsg;
    }
}
